import request from '@/utils/request'

export const addOneCoupon = data => request({
  url: '/addOneCoupon',
  method: 'put',
  data: data || {}
})

export const deleteOneCoupon = id => request({
  url: '/deleteOneCoupon/' + id,
  method: 'delete'
})

export const updateOneCoupon = data => request({
  url: '/updateOneCoupon',
  method: 'patch',
  data: data || {}
})

export const getOneCoupon = id => request({
  url: '/getOneCoupon/' + id,
  method: 'get'
})

export const getCouponList = data => request({
  url: '/getCouponList',
  method: 'post',
  data: data || {}
})

export const getAllCouponList = () => request({
  url: '/getAllCouponList',
  method: 'get'
})
